import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/home.vue'
import cityList from '@/views/citylist.vue'
import layoutHome from '@/views/layoutHome.vue'
import seekHome from '@/views/secondary/seekHome.vue'
import informationHome from '@/views/secondary/informationHome.vue'
import myPage from '@/views/secondary/myPage.vue'
const Map = () => import('@/views/map.vue')
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: layoutHome,
    redirect: '/home',
    children: [
      { path: '/home', component: Home },
      { path: '/seekHome', component: seekHome },
      { path: '/informationHome', component: informationHome },
      { path: '/myPage', component: myPage }
    ]
  },
  { path: '/citylist', component: cityList },
  { path: '/map', component: Map }
]

const router = new VueRouter({
  routes
})

export default router
